Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Spatial Java API Reference 10g Release 2 (10.2) B14373-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.spatial.util
Class DBFReaderJGeom

`java.lang.Object
oracle.spatial.util.DBFReaderJGeom`

public class DBFReaderJGeom
extends java.lang.Object

Nested Class Summary
`static class` | `DBFReaderJGeom.CharacterColumn`
`static class` | `DBFReaderJGeom.DateColumn`
`static class` | `DBFReaderJGeom.LogicalColumn`
`static class` | `DBFReaderJGeom.NumericColumn`
`static class` | `DBFReaderJGeom.RecordColumn`

Constructor Summary
`DBFReaderJGeom()`
`DBFReaderJGeom(java.lang.String name)` construct an object out of the specified shapefile's DBF file.

Method Summary
`void` | `closeDBF()` close this dbfile.
`java.lang.String` | `getFieldData(int ith, byte[] rec)` get the value string for the ith field in the given record.
`int` | `getFieldLength(int nth)` return the length of the specified field.
`java.lang.String` | `getFieldName(int ith)` returns the name for the ith field of records in this file.
`byte` | `getFieldType(int ith)` get the type for the ith field in a record.
`byte[]` | `getRecord(int nth)` retrieve the nth record in the file.
`int` | `numFields()` return the number of fields in each record
`int` | `numRecords()` return the number of records in the DBF file.
`void` | `openDBF(java.lang.String name)` Given a DBF file's name, open the file and read the header info.
`void` | `print()` nicely print out the general information of this shapefile.
`int` | `recordSize()` return the record size in the DBF file

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DBFReaderJGeom

    public DBFReaderJGeom()

### DBFReaderJGeom

    public DBFReaderJGeom(java.lang.String name)
                   throws java.io.IOException

  construct an object out of the specified shapefile's DBF file.

Method Detail

### openDBF

    public void openDBF(java.lang.String name)
                 throws java.io.IOException

  Given a DBF file's name, open the file and read the header info. Records can be read afterwards.
  Throws:
    `java.io.IOException`

### closeDBF

    public void closeDBF()
                  throws java.io.IOException

  close this dbfile.
  Throws:
    `java.io.IOException`

### numRecords

    public int numRecords()

  return the number of records in the DBF file.

### numFields

    public int numFields()

  return the number of fields in each record

### recordSize

    public int recordSize()

  return the record size in the DBF file

### getRecord

    public byte[] getRecord(int nth)

  retrieve the nth record in the file. return the pointer to the beginning of the record. the recordDeform method can be called on this pointer to interpret individual fields.

### getFieldData

    public java.lang.String getFieldData(int ith,
                                         byte[] rec)

  get the value string for the ith field in the given record. This is an ascii representation of this field's actual value. For fields with type 'I' or 'N', Use atoi() or strtod() accordingly to convert the returned string into an integer or double. Null is returned if something is wrong (e.g., invalid field index).

### getFieldLength

    public int getFieldLength(int nth)

  return the length of the specified field.

### getFieldName

    public java.lang.String getFieldName(int ith)

  returns the name for the ith field of records in this file.

### getFieldType

    public byte getFieldType(int ith)

  get the type for the ith field in a record. returns a single character the meaning of which is defined as below:

              'C': character

              'D': Date (8 digits: YYYYMMDD)

              'F': Floating point binary numeric: -. 0 1 2 3 4 5 6 7 8 9

              'G': General. All OEM characters or OLE.

              'L': Logical: ? Y y N  n T t F f (? initially)

              'M': Memo

              'N': Float: - . 0 1 2 3 4 5 6 7 8 9

              'I': Integer: - 0 1 2 3 4 5 6 7 8 9

### print

    public void print()

  nicely print out the general information of this shapefile.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Spatial Java API Reference 10g Release 2 (10.2) B14373-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, Oracle. All Rights Reserved.